// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_COOPERATION_ORDER
// * CreateDate    : 2014-06-05 18:30:19
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:19
// * LastChanger   : 2014-06-05 18:30:19
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class ProdCooperationOrderEntity : EntityBase
    {
        public ProdCooperationOrderTable TableSchema
        {
            get
            {
                return ProdCooperationOrderTable.Current;
            }
		}
		
		public ProdCooperationOrderEntity()
        {

        }
		
		public ProdCooperationOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
			this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.UnitPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_PRICE"]));
			this.TotalPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_PRICE"]));
			this.Weight = Convert.ToDecimal(CommonFunctions.ToObject(dr["WEIGHT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
			this.ProductName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_NAME"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_CODE"]));
			this.TechnicName = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_NAME"]));
			this.BackQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["BACK_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["WO_NO"]));
        }
		
		public ProdCooperationOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
			this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
			this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.SupplierName = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_NAME"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.UnitPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["UNIT_PRICE"]));
			this.TotalPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_PRICE"]));
			this.Weight = Convert.ToDecimal(CommonFunctions.ToObject(dr["WEIGHT"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.PlanDeliveryDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PLAN_DELIVERY_DATE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
			this.ProductName = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_NAME"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_CODE"]));
			this.TechnicName = Convert.ToString(CommonFunctions.ToObject(dr["TECHNIC_NAME"]));
			this.BackQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["BACK_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["WO_NO"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdCooperationOrderTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string OrderId
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_ORDER_ID)); }
            set { SetData(ProdCooperationOrderTable.C_ORDER_ID, value); }
        }
		
        [DataMember]
        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(ProdCooperationOrderTable.C_PRODUCT_TECHNIC_ID, value); }
        }
		
        [DataMember]
        public string OrderCode
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_ORDER_CODE)); }
            set { SetData(ProdCooperationOrderTable.C_ORDER_CODE, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_STATUS)); }
            set { SetData(ProdCooperationOrderTable.C_STATUS, value); }
        }
		
        [DataMember]
        public string SupplierId
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_SUPPLIER_ID)); }
            set { SetData(ProdCooperationOrderTable.C_SUPPLIER_ID, value); }
        }
		
        [DataMember]
        public string SupplierName
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_SUPPLIER_NAME)); }
            set { SetData(ProdCooperationOrderTable.C_SUPPLIER_NAME, value); }
        }
		
        [DataMember]
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(ProdCooperationOrderTable.C_QTY)); }
            set { SetData(ProdCooperationOrderTable.C_QTY, value); }
        }
		
        [DataMember]
        public decimal UnitPrice
        {
            get { return Convert.ToDecimal(GetData(ProdCooperationOrderTable.C_UNIT_PRICE)); }
            set { SetData(ProdCooperationOrderTable.C_UNIT_PRICE, value); }
        }
		
        [DataMember]
        public decimal TotalPrice
        {
            get { return Convert.ToDecimal(GetData(ProdCooperationOrderTable.C_TOTAL_PRICE)); }
            set { SetData(ProdCooperationOrderTable.C_TOTAL_PRICE, value); }
        }
		
        [DataMember]
        public decimal Weight
        {
            get { return Convert.ToDecimal(GetData(ProdCooperationOrderTable.C_WEIGHT)); }
            set { SetData(ProdCooperationOrderTable.C_WEIGHT, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_REMARK)); }
            set { SetData(ProdCooperationOrderTable.C_REMARK, value); }
        }
		
        [DataMember]
        public DateTime PlanDeliveryDate
        {
            get { return Convert.ToDateTime(GetData(ProdCooperationOrderTable.C_PLAN_DELIVERY_DATE)); }
            set { SetData(ProdCooperationOrderTable.C_PLAN_DELIVERY_DATE, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdCooperationOrderTable.C_CREATED_DATE)); }
            set { SetData(ProdCooperationOrderTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_CREATED_BY)); }
            set { SetData(ProdCooperationOrderTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(ProdCooperationOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(ProdCooperationOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        [DataMember]
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(ProdCooperationOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        [DataMember]
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(ProdCooperationOrderTable.C_APPROVED_DATE)); }
            set { SetData(ProdCooperationOrderTable.C_APPROVED_DATE, value); }
        }
		
        [DataMember]
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_APPROVED_BY)); }
            set { SetData(ProdCooperationOrderTable.C_APPROVED_BY, value); }
        }
		
        [DataMember]
        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_PRODUCT_ID)); }
            set { SetData(ProdCooperationOrderTable.C_PRODUCT_ID, value); }
        }
		
        [DataMember]
        public string ProductCode
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_PRODUCT_CODE)); }
            set { SetData(ProdCooperationOrderTable.C_PRODUCT_CODE, value); }
        }
		
        [DataMember]
        public string ProductName
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_PRODUCT_NAME)); }
            set { SetData(ProdCooperationOrderTable.C_PRODUCT_NAME, value); }
        }
		
        [DataMember]
        public string TechnicCode
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_TECHNIC_CODE)); }
            set { SetData(ProdCooperationOrderTable.C_TECHNIC_CODE, value); }
        }
		
        [DataMember]
        public string TechnicName
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_TECHNIC_NAME)); }
            set { SetData(ProdCooperationOrderTable.C_TECHNIC_NAME, value); }
        }
		
        [DataMember]
        public decimal BackQty
        {
            get { return Convert.ToDecimal(GetData(ProdCooperationOrderTable.C_BACK_QTY)); }
            set { SetData(ProdCooperationOrderTable.C_BACK_QTY, value); }
        }
		
        [DataMember]
        public string Unit
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_UNIT)); }
            set { SetData(ProdCooperationOrderTable.C_UNIT, value); }
        }
		
        [DataMember]
        public string WoNo
        {
            get { return Convert.ToString(GetData(ProdCooperationOrderTable.C_WO_NO)); }
            set { SetData(ProdCooperationOrderTable.C_WO_NO, value); }
        }
		
		#endregion
	}
	
	
}	

